Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDISCROWD-7362 update location pref UI #481

Merged
merged 2 commits into from
Dec 6, 2024
Merged

RDISCROWD-7362 update location pref UI #481

merged 2 commits into from
Dec 6, 2024

Conversation

n00rsy
Copy link

@n00rsy n00rsy commented Dec 5, 2024

Issue number of the reported bug or feature request: RDISCROWD-7362

Describe your changes
Add parenthesis around country codes for easy identification

image

@n00rsy n00rsy requested a review from peterkle December 5, 2024 21:17
@@ -6,7 +6,9 @@
<p><strong>Language(s):</strong> {{form.data.languages|join(', ') }}</p>
{% endif %}
{% if form.data.locations %}
<p><strong>Location(s):</strong> {{form.data.locations|join(', ') }}</p>
<p><strong>Location(s):</strong>
{% for location in form.data.locations %} {{ '(' ~ location ~ ')' if location|length == 2 else location }}{% if not loop.last %}, {% endif %} {% endfor %}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we adjust this to display the format:

Country Name One (CO), Country Name Two (CP), Country Name Three (CQ)

<p><strong>Location(s):</strong>  
{% for i in range(0, form.data.locations|length, 2) %}  
{{ form.data.locations[i] }} ({{ form.data.locations[i+1] }}){% if not loop.last %}, {% endif %}  
{% endfor %}  
</p>  

Copy link
Author

@n00rsy n00rsy Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not guaranteed to have a country code mapping for each country, so unfortunately we cannot assume [i+1] is a country code.

Adjusted via 3267f47

Updated UI:

image

@n00rsy n00rsy merged commit 6b7e2c7 into main Dec 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants